home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 34 / 034.d81 / labyrinth 101 (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  103 lines

  1. 2 poke55,255:poke56,55:poke650,128
  2. 5 a=a+1:ifa=1thenload"labyrinth.fnt",8,1
  3. 7 poke53272,(peek(53272)and240)or14
  4. 10 poke53280,.:poke53281,.
  5. 20 print"[147]       [196]ispute?'s [199]azelle presents:":ch=28:nm=.:fi=1264:sb=.
  6. 25 print"[150]             [204]abyrinth 101"
  7. 26 print"            by [205]ike [205]aynard"
  8. 27 print"[153]        [211]elect difficulty level:"
  9. 30 printtab(14)"1. [154][206]ovice"
  10. 40 printtab(14)"2. [154][197]xpert"
  11. 50 printtab(14)"3. [154][209]uit":poke198,.
  12. 55 print"[153]          [208]ress selection..."
  13. 60 geta$:ifa$=""then60
  14. 70 ifa$="1"thenne$="[206]ovice":goto100
  15. 80 ifa$="2"thenne$="[197]xpert":goto100
  16. 90 ifa$="3"thengosub2140
  17. 95 goto60
  18. 100 print"[154][208]lease wait while generating maze."
  19. 101 print"[195]alculating: ":in=int(rnd(0)*100)+1000
  20. 102 fora=10334to545215stepin:print"[145][159]"tab(13)a:next:print
  21. 103 ifa$="1"thenprint"[200]mmm... [212]his one shouldn't be too hard."
  22. 104 ifa$="2"thenprint"[200]mmm... [212]his one may take you a while."
  23. 105 print"          [154][208]ress [211][208][193][195][197] [154]to start."
  24. 106 getb$:ifb$<>" "then106
  25. 108 ad=1644:mn=20:print"[147]          [154][204]abyrinth 101 [[155]"ne$"[154]]"
  26. 109 print"[154]             [208]ress [209] [154]to quit."
  27. 110 ifa$="1"thengosub1000:ad=1644:mn=20:    rem draw novice maze
  28. 120 ifa$="2"thengosub1100:ad=1644:mn=0:    rem draw expert maze
  29. 130 print"[129][213]se [158][211][200][201][198][212] [210][197][212][213][210][206][129], [158][198]6[129], [158][195][207][205][205][207][196][207][210][197] [197][129],"
  30. 135 print"and [158][195][212][210][204] [201] [129]to move up, right, down,"
  31. 140 print"and left, respectfully."
  32. 145 print"([193] joystick in port [150]2 will work also.)"
  33. 150 pokead,ch:poke54272+ad,1:ifad<fithen800
  34. 151 j2=(peek(56320)and15):geta$
  35. 152 if(07eorj2)<>15thena$=chr$(141)
  36. 153 if(13eorj2)<>15thena$=""
  37. 154 if(11eorj2)<>15thena$="[139]"
  38. 155 if(14eorj2)<>15thena$="[177]"
  39. 160 ifa$<>chr$(141)anda$<>""anda$<>"[139]"anda$<>"[177]"anda$<>"q"then151
  40. 170 ifa$=chr$(141)thena=-40
  41. 175 ifa$=""thena=-1
  42. 180 ifa$="[139]"thena=1
  43. 185 ifa$="[177]"thena=40
  44. 190 ifa$="q"andnm<mnthengosub2100:goto151
  45. 195 ifa$="q"andnm>=mnthen900
  46. 200 ifpeek(ad+a)=32thenpokead,32:ad=ad+a:a=.:hi=1:gosub2000:nm=nm+1
  47. 205 ifpeek(ad+a)=32thengosub300:goto150
  48. 210 hi=95:gosub2000:goto151
  49. 300 if(ad<>1414)or(sb)thenreturn
  50. 310 sb=1
  51. 320 print"[189]     [173]"
  52. 330 print"[178][157][221][157][189]";:return
  53. 800 print"";
  54. 802 fora=1to4:print"                                       ":next:print"[145][145][145][145]";
  55. 805 print"[158][193]-mazing!! [217]ou made it out of the maze!"
  56. 810 print"[154]        [208]ress [211][208][193][195][197][154] to continue.       ":poke198,.
  57. 820 geta$:ifa$<>" "then820
  58. 830 goto10
  59. 900 print"         [211]o close, yet so far ...  "
  60. 910 fora=1to3000:next:goto10
  61. 999 end
  62. 1000 print"                 [221][158][197][216][201][212]![221]"
  63. 1005 print"                 [221]     [221]"
  64. 1008 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
  65. 1010 print"[221]                                      [221]";
  66. 1020 print"[221]   [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]   [221]";
  67. 1030 print"[221]   [221]                              [221]   [221]";
  68. 1040 print"[221]   [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]   [221]   [221]";
  69. 1050 print"[221]                                  [221]   [221]";
  70. 1060 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]   [221]";
  71. 1070 print"                 [221]                     [221]";
  72. 1080 print"                 [221]     [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
  73. 1090 print"                 [221]     [221]"
  74. 1095 print"                 [221][158][197][206][212][197][210][221]"
  75. 1099 return
  76. 1100 print"                 [221][158][197][216][201][212]![221]"
  77. 1105 print"                 [221]     [221]"
  78. 1108 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]     [171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
  79. 1110 print"[221]                [221]     [221]               [221]";
  80. 1120 print"[221]   [176][192][192][192][192][192][192][192][192][192][192][192][192][179]     [171][192][192][192][192][192][192][192][192][192][192][192][174]   [221]";
  81. 1130 print"[221]   [221]            [221]     [221]           [221]   [221]";
  82. 1140 print"[221]   [173][192][192][192][192][192][192][192][192][192][192][192][192][179]     [171][192][192][192][192][192][192][192][192]   [221]   [221]";
  83. 1150 print"[221]                [221]     [221]           [221]   [221]";
  84. 1160 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]     [171][192][192][192][192][192][192][192][192][192][192][192][189]   [221]";
  85. 1170 print"                 [221]     [221]               [221]";
  86. 1180 print"                 [221]     [171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
  87. 1190 print"                 [221]     [221]"
  88. 1195 print"                 [221][158][197][206][212][197][210][221]"
  89. 1199 return
  90. 2000 poke54296,15:poke54276,.:poke54273,hi:poke54272,100
  91. 2010 poke54277,5:poke54278,5:poke54276,33:return
  92. 2100 ifnm<20then2200
  93. 2110 print"[154][145]  [193]re you sure you want to quit? ([217][154]/[206][154])":poke198,.
  94. 2120 geta$:ifa$<>"y"anda$<>"n"then2120
  95. 2130 ifa$="n"then2220
  96. 2140 open15,8,15,"r0:connect=connect":input#15,er:close15:ifer<>63thenend
  97. 2145 poke53272,23:poke55,.:poke56,160
  98. 2150 load "connect",8
  99. 2200 print"[150]          [217]ou give up too easy."
  100. 2210 fora=1to2000:next
  101. 2220 print"[145]             [154][208]ress [209] [154]to quit.         "
  102. 2230 poke198,.:return
  103.